﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;

namespace SharpMedia
{
    public class SynchronousCall
    {
        private Delegate method;

        public Delegate Method
        {
            get { return method; }
            set { method = value; }
        }
        private object[] parameters;

        public object[] Params
        {
            get { return parameters; }
            set { parameters = value; }
        }

        public SynchronousCall(Delegate method, params object[] parameters)
        {
            this.method = method;
            this.parameters = parameters;
        }

        public virtual void Invoke()
        {
            method.DynamicInvoke(parameters);
        }

    }
}
